package articleStudy.stream;

import java.util.function.Consumer;

/**
 * Consumer接口简单测试
 */
public class ConsumerDemo {
    public static void main(String[] args) {
        Consumer c=System.out::println;

        c.accept("Hello World!");
        c.accept("haha");
        c.accept("bibi cheers");

        //联用，达到多重处理的结果
        c.andThen(c).andThen(c).accept("hello world");
    }
}
